/**
 * 
 *   @param  {boolean} keepAlive     true 页面不刷新
 *   @param  {number}  type          1   平台管理    2  企业管理   3  代理商管理  4  服务商管理   5 安全中心
 * 
 */



export default [
  //   登录
  {
    path: "/login",
    name: "login",
    component: () => import("@/components/home/login.vue"),
    meta: { keepAlive: false }
  },
  {
    path: "/",
    name: "index",
    component: () => import("@/components/index.vue"),
    meta: { keepAlive: false },
    children: [
      //  平台管理
      //  角色管理  -  新增服务商  - 管理员列表
      {
        path: "/terrace_role",
        name: "terrace_role",
        component: () => import("@/components/terrace/terrace_role/terrace_role.vue"),
        meta: {
          keepAlive: false,
          type: 1,
          route: [
            {
              title: "角色管理",
              path: "/terrace_role"
            }
          ]
        },
      },
      //  角色管理  含（修改、查看、新增） 
      // 角色管理- 新增  
      {
        path: "/terrace_role/terrace_role_add",
        name: "terrace_role_add",
        component: () => import("@/components/terrace/terrace_role/child_component/terrace_role_add.vue"),
        meta: {
          keepAlive: true,
          type: 1,
          route: [
            {
              title: "角色管理",
              path: "/terrace_role"
            },
            {
              title: "新增角色",
              path: "/terrace_role/terrace_role_add"
            }
          ]
        },
      },
      //  角色管理-修改
      {
        path: "/terrace_role/terrace_role_amend",
        name: "terrace_role_amend",
        component: () => import("@/components/terrace/terrace_role/child_component/terrace_role_amend.vue"),
        meta: {
          keepAlive: true,
          type: 1,
          route: [
            {
              title: "角色管理",
              path: "/terrace_role"
            },
            {
              title: "修改角色",
              path: "/terrace_role/terrace_role_amend"
            }
          ]
        },
      },
      //  角色管理-查看
      {
        path: "/terrace_role/terrace_role_look",
        name: "terrace_role_look",
        component: () => import("@/components/terrace/terrace_role/child_component/terrace_role_look.vue"),
        meta: {
          keepAlive: false,
          type: 1,
          route: [
            {
              title: "角色管理",
              path: "/terrace_role"
            },
            {
              title: "查看角色",
              path: "/terrace_role/terrace_role_look"
            }
          ]
        },
      },

      // 管理员列表 含(新增、修改、查看)
      {
        path: "/terrace_administrators",
        name: "terrace_administrators",
        component: () => import("@/components/terrace/terrace_administrators/terrace_administrators.vue"),
        meta: {
          keepAlive: false,
          type: 1,
          route: [
            {
              title: "管理员列表",
              path: "/terrace_administrators"
            },
          ]
        },
      },
      //  管理员列表-新增
      {
        path: "/terrace_administrators/terrace_administrators_add",
        name: "terrace_role_add",
        component: () => import("@/components/terrace/terrace_administrators/child_component/terrace_administrators_add.vue"),
        meta: {
          keepAlive: true,
          type: 1,
          route: [
            {
              title: "管理员列表",
              path: "/terrace_administrators"
            },
            {
              title: "新增管理员",
              path: "/terrace_administrators/terrace_administrators_add"
            }
          ]
        },
      },
      //  管理员列表-修改
      {
        path: "/terrace_administrators/terrace_administrators_amend",
        name: "terrace_role_amend",
        component: () => import("@/components/terrace/terrace_administrators/child_component/terrace_administrators_amend.vue"),
        meta: {
          keepAlive: true,
          type: 1,
          route: [
            {
              title: "管理员列表",
              path: "/terrace_administrators"
            },
            {
              title: "修改管理员",
              path: "/terrace_administrators/terrace_administrators_amend"
            }
          ]
        },
      },
      //  管理员列表-查看
      {
        path: "/terrace_administrators/terrace_administrators_look",
        name: "terrace_role_look",
        component: () => import("@/components/terrace/terrace_administrators/child_component/terrace_administrators_look.vue"),
        meta: {
          keepAlive: false,
          type: 1,
          route: [
            {
              title: "管理员列表",
              path: "/terrace_administrators"
            },
            {
              title: "查看管理员",
              path: "/terrace_administrators/terrace_administrators_look"
            }
          ]
        },
      }
      ,
      //  企业管理
      //  企业列表  -  签约记录  
      {
        path: "/enterprise_list",
        name: "enterprise_list",
        component: () => import("@/components/enterprise/enterprise_list/enterprise_list.vue"),
        meta: {
          keepAlive: false,
          type: 2,
          route: [
            {
              title: "企业列表",
              path: "/enterprise_list"
            }
          ]
        },
      },
      //   企业列表-查看（基本信息、签约设置、账户设置）
      {
        path: "/enterprise_list/enterprise_list_look",
        name: "enterprise_list_look",
        component: () => import("@/components/enterprise/enterprise_list/child_component/enterprise_list_look.vue"),
        meta: {
          keepAlive: false,
          type: 2,
          route: [
            {
              title: "企业列表",
              path: "/enterprise_list"
            },
            {
              title: "查看企业",
              path: "/enterprise_list/enterprise_list_look"
            }
          ]
        },
      },
      //  企业管理-签约记录
      {
        path: "/enterprise_record_signing",
        name: "enterprise_record_signing",
        component: () => import("@/components/enterprise/enterprise_record_signing/enterprise_record_signing.vue"),
        meta: {
          keepAlive: false,
          type: 2,
          route: [
            {
              title: "签约记录",
              path: "/enterprise_record_signing"
            }
          ]
        },
      },
      //  代理商管理
      //  代理商列表   
      {
        path: "/agent_list",
        name: "agent_list",
        component: () => import("@/components/agent/agent_list.vue"),
        meta: {
          keepAlive: false,
          type: 3,
          route: [
            {
              title: "代理商列表",
              path: "/agent_list"
            }
          ]
        },
      },
      // 代理商列表-查看
      {
        path: "/agent_list/agent_list_look",
        name: "agent_list_look",
        component: () => import("@/components/agent/child_component/agent_list_look.vue"),
        meta: {
          keepAlive: false,
          type: 3,
          route: [
            {
              title: "代理商列表",
              path: "/agent_list"
            },
            {
              title: "查看代理商",
              path: "/agent_list/agent_list_look"
            }
          ]
        },
      },
      //  服务商管理
      //  服务商列表- 代发记录 - 开票记录 - 充值记录
      , {
        path: "/facilitator_list",
        name: "facilitator_list",
        component: () => import("@/components/facilitator/facilitator_list/facilitator_list.vue"),
        meta: {
          keepAlive: false,
          type: 4,
          route: [
            {
              title: "服务商列表",
              path: "/facilitator_list"
            }
          ]
        },
      },
      // 服务商列表-查看（参数详情，费率详情）
      {
        path: "/facilitator_list/facilitator_list_look",
        name: "facilitator_list_look",
        component: () => import("@/components/facilitator/facilitator_list/child_component/facilitator_list_look.vue"),
        meta: {
          keepAlive: false,
          type: 4,
          route: [
            {
              title: "服务商列表",
              path: "/facilitator_list"
            },
            {
              title: "查看服务商",
              path: "/facilitator_list/facilitator_list_look"
            }
          ]
        },
      },
      // 服务商列表-修改 （费率详情修改，账户详情修改）
      {
        path: "/facilitator_list/facilitator_list_amend",
        name: "facilitator_list_amend",
        component: () => import("@/components/facilitator/facilitator_list/child_component/facilitator_list_amend.vue"),
        meta: {
          keepAlive: true,
          type: 4,
          route: [
            {
              title: "服务商列表",
              path: "/facilitator_list"
            },
            {
              title: "修改服务商",
              path: "/facilitator_list/facilitator_list_amend"
            }
          ]
        },
      },
      // 服务商列表-新增 
      {
        path: "/facilitator_list/facilitator_list_add",
        name: "facilitator_list_add",
        component: () => import("@/components/facilitator/facilitator_list/child_component/facilitator_list_add.vue"),
        meta: {
          keepAlive: true,
          type: 4,
          route: [
            {
              title: "服务商列表",
              path: "/facilitator_list"
            },
            {
              title: "新增服务商",
              path: "/facilitator_list/facilitator_list_add"
            }
          ]
        },
      },
      //  服务商管理-代发记录
      {
        path: "/facilitator_send_records",
        name: "facilitator_send_records",
        component: () => import("@/components/facilitator/facilitator_send_records/facilitator_send_records.vue"),
        meta: {
          keepAlive: false,
          type: 4,
          route: [
            {
              title: "付款记录",
              path: "/facilitator_send_records"
            },
          ]
        },
      },
      // 代发记录-详情
      {
        path: "/facilitator_send_records/facilitator_send_records_detail",
        name: "facilitator_send_records_detail",
        component: () => import("@/components/facilitator/facilitator_send_records/child_component/facilitator_send_records_detail.vue"),
        meta: {
          keepAlive: false,
          type: 4,
          route: [
            {
              title: "付款记录",
              path: "/facilitator_send_records"
            },
            {
              title: "记录详情",
              path: "/facilitator_send_records/facilitator_send_records_detail"
            },
          ]
        },
      },
      //  服务商管理-开票记录
      {
        path: "/facilitator_invoice_records",
        name: "facilitator_invoice_records",
        component: () => import("@/components/facilitator/facilitator_invoice_records/facilitator_invoice_records.vue"),
        meta: {
          keepAlive: false,
          type: 4,
          route: [
            {
              title: "开票记录",
              path: "/facilitator_invoice_records"
            }
          ]
        },
      },
      //  开票记录-查看
      {
        path: "/facilitator_invoice_records/facilitator_invoice_records_look",
        name: "facilitator_invoice_records_look",
        component: () => import("@/components/facilitator/facilitator_invoice_records/child_component/facilitator_invoice_records_look.vue"),
        meta: {
          keepAlive: false,
          type: 4,
          route: [
            {
              title: "开票记录",
              path: "/facilitator_invoice_records"
            },
            {
              title: "查看开票记录",
              path: "/facilitator_invoice_records/facilitator_invoice_records_look"
            }
          ]
        },
      },
      //   服务商管理-充值记录
      {
        path: "/facilitator_pay_records",
        name: "facilitator_pay_records",
        component: () => import("@/components/facilitator/facilitator_pay_records/facilitator_pay_records.vue"),
        meta: {
          keepAlive: false,
          type: 4,
          route: [
            {
              title: "充值记录",
              path: "/facilitator_pay_records"
            }
          ]
        },
      },
      // 充值记录-详情
      {
        path: "/facilitator_pay_records/facilitator_pay_records_detail",
        name: "facilitator_pay_records_detail",
        component: () => import("@/components/facilitator/facilitator_pay_records/child_component/facilitator_pay_records_detail.vue"),
        meta: {
          keepAlive: false,
          type: 4,
          route: [
            {
              title: "充值记录",
              path: "/facilitator_pay_records"
            },
            {
              title: "充值详情",
              path: "/facilitator_pay_records/facilitator_pay_records_detail"
            }
          ]
        },
      },
      //  安全中心-密码设置
      {
        path: "/safety_make_password",
        name: "safety_make_password",
        component: () => import("@/components/safety/safety_make_password.vue"),
        meta: { keepAlive: false, type: 5, },
      },
      //  修改成功展示界面
      {
        path: "/success",
        name: "success",
        component: () => import("@/components/success.vue"),
      },
      //  系统管理-敏感词
      {
        path: "/sensitive_word",
        name: "sensitive_word",
        component: () => import("@/components/system/sensitive_word.vue"),         
      },
      
      //  系统管理-发票类目
      {
        path: "/invoice_category",
        name: "invoice_category",
        component: () => import("@/components/system/invoice_category.vue"),         
      },
    ]
  },

]